home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-02
/
hcdemo.zip
/
GRINIT.INC
< prev
next >
Wrap
Text File
|
1993-01-04
|
601b
|
20 lines
procedure Initialize(Var Gd:integer);
Var
GraphMode, ErrorCode : Integer;
{ Initialize graphics and report any errors that may occur }
begin
{ when using Crt and graphics, turn off Crt's memory-mapped writes }
DirectVideo := False;
Gd := Detect; { Auto Detection }
GraphMode := Gd;
InitGraph(Gd, GraphMode, ''); { activate graphics }
ErrorCode := GraphResult; { error? }
if ErrorCode <> grOk then
begin
Writeln('Graphics error: ', GraphErrorMsg(ErrorCode));
Halt(1);
end;
SetViewPort(0,0,GetMaxX,GetMaxY,ClipOn);
end; { Initialize }